<?php
/*
 * 手机客户端 秀场删除评论接口
 * 传入参数 
 * 2013-12-011
 */
include "inc/public_header.php";
 
include "func/user.php";				//用户信息处理函数

$reJson = array();//构建返回值


$pid 			= $_REQUEST["commentId"];	//评论主键

//获取用户信息
$uInfoArr = user_getInfoFromUUID();
if(!$uInfoArr){
	echo json_encode(array("success"=>"0","errCode"=>"0"));
	die;
}
$uid = $uInfoArr["uid"];//用户信息主键


//查询评论作者
$sql="select uid from new_weituo_comment where id='".$pid."'";
$db->query($sql);
$db->next_record();
$zpuid = $db->f("uid");

//删除评论
if($uid==$zpuid){
	$sql="update new_weituo_comment set dr='1' where id='".$pid."'";
	$db->query($sql);
	$reJson["success"] = "1";
	}else{
	echo json_encode(array("success"=>"0","errCode"=>"-1"));
	die;
}

echo json_encode($reJson);
?>